home *** CD-ROM | disk | FTP | other *** search
/ Gurewich OLE Controls for Visual Basic 4 / Gurewich OLE Controls for Visual Basic 4.iso / ocxprog / programs / ch20 / dance.frm (.txt) next >
Encoding:
Visual Basic Form  |  1995-08-24  |  3.9 KB  |  127 lines

  1. VERSION 4.00
  2. Begin VB.Form frmDance 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "The Dance Program"
  5.    ClientHeight    =   3135
  6.    ClientLeft      =   2205
  7.    ClientTop       =   2160
  8.    ClientWidth     =   5670
  9.    Height          =   3825
  10.    Icon            =   "DANCE.frx":0000
  11.    Left            =   2145
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    ScaleHeight     =   209
  15.    ScaleMode       =   3  'Pixel
  16.    ScaleWidth      =   378
  17.    Top             =   1530
  18.    Width           =   5790
  19.    Begin TegommLibCtl.Tegomm Tegomm1 
  20.       Height          =   495
  21.       Left            =   1200
  22.       TabIndex        =   1
  23.       Top             =   1200
  24.       Width           =   3510
  25.       _version        =   65536
  26.       _extentx        =   6191
  27.       _extenty        =   873
  28.       _stockprops     =   64
  29.       updateinterval  =   400
  30.    End
  31.    Begin TeganimLib.TegoAnim TegoAnim1 
  32.       Height          =   3150
  33.       Left            =   0
  34.       TabIndex        =   0
  35.       Top             =   0
  36.       Width           =   5700
  37.       _version        =   65536
  38.       _extentx        =   10054
  39.       _extenty        =   5556
  40.       _stockprops     =   0
  41.    End
  42.    Begin VB.Menu mnuFile 
  43.       Caption         =   "&File"
  44.       Begin VB.Menu mnuExit 
  45.          Caption         =   "E&xit"
  46.       End
  47.    End
  48.    Begin VB.Menu mnuHelp 
  49.       Caption         =   "&Help"
  50.       Begin VB.Menu mnuAbout 
  51.          Caption         =   "&About..."
  52.       End
  53.    End
  54. Attribute VB_Name = "frmDance"
  55. Attribute VB_Creatable = False
  56. Attribute VB_Exposed = False
  57. ' All variables must be declared.
  58. Option Explicit
  59. Private Sub Form_Click()
  60. TegoAnim1.CurrentFrame = TegoAnim1.CurrentFrame + 1
  61. End Sub
  62. Private Sub Form_Load()
  63. Dim Path
  64. Tegomm1.Visible = False
  65. ' Get the program's path.
  66. Path = App.Path
  67. If Right(Path, 1) <> "\" Then
  68.    Path = Path + "\"
  69. End If
  70. Tegomm1.DeviceType = "WaveAudio"
  71. Tegomm1.filename = Path + "LASTC2M6.WAV"
  72. Tegomm1.Command = "Open"
  73. Tegomm1.Command = "Play"
  74. ' Create five frames for the dance animation show.
  75. TegoAnim1.CreateFrames (5)
  76. ' Fill the 5 frames with 5 pictures.
  77. TegoAnim1.SetFramePicture 0, LoadPicture(Path + "DANCE0.BMP")
  78. TegoAnim1.SetFramePicture 1, LoadPicture(Path + "DANCE1.BMP")
  79. TegoAnim1.SetFramePicture 2, LoadPicture(Path + "DANCE2.BMP")
  80. TegoAnim1.SetFramePicture 3, LoadPicture(Path + "DANCE3.BMP")
  81. TegoAnim1.SetFramePicture 4, LoadPicture(Path + "DANCE4.BMP")
  82. End Sub
  83. Private Sub mnuAbout_Click()
  84.    Dim Title
  85.    Dim Msg
  86.    Dim CR
  87.    CR = Chr(13) + Chr(10)
  88.    ' Prepare the title of the About message box.
  89.    Title = "About the Sprite2 Program"
  90.    Msg = "This program was written with Visual "
  91.    Msg = Msg + "Basic for Windows, using the "
  92.    Msg = Msg + "TegoSoft Multimedia OCX control "
  93.    Msg = Msg + "and TegoSoft Animation OCX control."
  94.    Msg = Msg + CR + CR
  95.    Msg = Msg + "These OCX controls "
  96.    Msg = Msg + "are part of the TegoSoft OCX Control "
  97.    Msg = Msg + "Kit - a collection of various OCX controls. "
  98.    Msg = Msg + CR + CR
  99.    Msg = Msg + "For more information about the "
  100.    Msg = Msg + "TegoSoft OCX Control Kit, contact TegoSoft "
  101.    Msg = Msg + "at:"
  102.    Msg = Msg + CR + CR
  103.    Msg = Msg + "TegoSoft Inc." + CR
  104.    Msg = Msg + "P.O. Box 389" + CR
  105.    Msg = Msg + "Bellmore, NY 11710"
  106.    Msg = Msg + CR + CR
  107.    Msg = Msg + "Phone: (516)783-4824"
  108.    ' Display the About message box.
  109.    MsgBox Msg, vbInformation, Title
  110.    ' Make sure that there is playback after
  111.    ' the user closes the modal message box.
  112.    Tegomm1.Command = "Play"
  113. End Sub
  114. Private Sub mnuExit_Click()
  115. ' Terminate the program.
  116. Unload Me
  117. End Sub
  118. Private Sub Tegomm1_Done()
  119. If Tegomm1.Position = Tegomm1.Length Then
  120.    Tegomm1.Command = "Prev"
  121.    Tegomm1.Command = "Play"
  122. End If
  123. End Sub
  124. Private Sub Tegomm1_StatusUpdate()
  125. TegoAnim1.CurrentFrame = TegoAnim1.CurrentFrame + 1
  126. End Sub
  127.